{{#if canJoinGroup}}
  {{#if userIsGroupUser}}
    {{d-button action="leaveGroup"
        class="btn-danger group-index-leave"
        icon="minus"
        label="groups.leave"
        disabled=updatingMembership}}
  {{else}}
    {{d-button action=joinGroupAction
        class="group-index-join"
        icon="plus"
        label="groups.join"
        disabled=updatingMembership}}
  {{/if}}
{{else if canRequestMembership}}
  {{#if userIsGroupUser}}
    {{#if showMembershipStatus}}
      {{d-button
          class="btn-primary"
          icon="user"
          label="groups.is_group_user"
          disabled=true}}
    {{/if}}
  {{else}}
    {{d-button action=requestMembershipAction
        class="group-index-request"
        icon="envelope"
        label="groups.request"}}
  {{/if}}
{{else}}
  {{yield}}
{{/if}}
